package com.le.tester.javaThink.fifth.chapter18_Str;

/**
 * createTime：2021/8/12 14:04
 * description：替换匹配的字符
 */
public class Replacing {
    public static String s = Splitting.knights;

    public static void main(String[] args) {
        System.out.println(s.replaceFirst("f\\w+", "located"));
        System.out.println(s.replaceAll("shrubbery|tree|herring", "banana"));
    }
}
